package cn.ren.cloud.exception;

import cn.ren.cloud.enums.GlobelExceptionEnum;
import lombok.Data;

/**
 * @author 23508
 */
@Data
public class GlobalCustomException extends RuntimeException {
    private String code;


    public GlobalCustomException() {
    }

    public GlobalCustomException(String message) {
        super(message);
    }

    public GlobalCustomException(String message, String code) {
        super(message);
        this.code = code;
    }

    public GlobalCustomException(GlobelExceptionEnum globeExceptionEnum) {
        super(globeExceptionEnum.getMessage());
        this.code = globeExceptionEnum.getCode();
    }
}
